<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QxOrm: qx::cache Namespace Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo_qxorm.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">QxOrm
   &#160;<span id="projectnumber">1.4.3</span>
   </div>
   <div id="projectbrief">C++ Object Relational Mapping library</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="namespaces.html"><span>Namespace&#160;List</span></a></li>
      <li><a href="namespacemembers.html"><span>Namespace&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('namespaceqx_1_1cache.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">qx::cache Namespace Reference<div class="ingroups"><a class="el" href="group___qx_cache.html">QxCache : QxOrm library basic thread-safe cache feature to backup and restore any kind of objects (for example, object fetched from database)</a></div></div>  </div>
</div>
<div class="contents">

<p>Provide basic thread-safe cache feature to backup and restore any kind of objects (for example, object fetched from database)  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceqx_1_1cache_1_1detail.html">detail</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>Internal helper tools for <a class="el" href="namespaceqx_1_1cache.html" title="Provide basic thread-safe cache feature to backup and restore any kind of objects (for example...">qx::cache</a> namespace. </p>
<br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___qx_cache.html#gab21b5d2544f38e06e44a2b7bc52e8262">max_cost</a> (long l)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the maximum allowed total cost of the cache to l. If the current total cost is greater than l, some objects are deleted immediately.  <a href="group___qx_cache.html#gab21b5d2544f38e06e44a2b7bc52e8262"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___qx_cache.html#ga394ff7635d7c7a4d5f835c864dd3e4db">max_cost</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the maximum allowed total cost of the cache.  <a href="group___qx_cache.html#ga394ff7635d7c7a4d5f835c864dd3e4db"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___qx_cache.html#gac78c126e6f75bc48811ea7fc74122ae3">current_cost</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the current cost used by the cache.  <a href="group___qx_cache.html#gac78c126e6f75bc48811ea7fc74122ae3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___qx_cache.html#gace04518e9bf2dd2fca8449037ceffa19">count</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of objects in the cache.  <a href="group___qx_cache.html#gace04518e9bf2dd2fca8449037ceffa19"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___qx_cache.html#ga0c33b55759a4e97d625afa3d42631e07">is_empty</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if the cache contains no object; otherwise return false.  <a href="group___qx_cache.html#ga0c33b55759a4e97d625afa3d42631e07"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___qx_cache.html#ga9334ed3464961f8d21fe022ef3a91203">clear</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete all the objects in the cache.  <a href="group___qx_cache.html#ga9334ed3464961f8d21fe022ef3a91203"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___qx_cache.html#ga1b3b7fe7db7920493f40d0adb9c4957e">exist</a> (const QString &amp;sKey)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if the cache contains an object associated with key sKey; otherwise return false.  <a href="group___qx_cache.html#ga1b3b7fe7db7920493f40d0adb9c4957e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___qx_cache.html#gacd19c6b26c18bd3f96a58b639ebaf7db">remove</a> (const QString &amp;sKey)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete the object associated with key sKey. Return true if the object was found in the cache; otherwise return false.  <a href="group___qx_cache.html#gacd19c6b26c18bd3f96a58b639ebaf7db"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___qx_cache.html#ga82a848c3fbc52af86aad56812500b0fb">set</a> (const QString &amp;sKey, T &amp;t, long lCost=1, const QDateTime &amp;dt=QDateTime())</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert object t into the cache with key sKey, associated cost lCost and insertion date-time dt. Any object with the same key already in the cache will be removed.  <a href="group___qx_cache.html#ga82a848c3fbc52af86aad56812500b0fb"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___qx_cache.html#gaf467221c40ed6d8960109a8a00c3e3fa">get</a> (const QString &amp;sKey)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the object of type T associated with key sKey, or return default instance of T() if the key does not exist in the cache.  <a href="group___qx_cache.html#gaf467221c40ed6d8960109a8a00c3e3fa"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___qx_cache.html#ga934010ad97d2ab079e447df20faf8766">get</a> (const QString &amp;sKey, T &amp;t, QDateTime &amp;dt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if object t can be fetched with associated key sKey and insertion date-time dt; otherwise return false with an error description.  <a href="group___qx_cache.html#ga934010ad97d2ab079e447df20faf8766"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___qx_cache.html#gaf48befbb27f140da88cb3c3ffe2f4660">get</a> (const QString &amp;sKey, T &amp;t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if object t can be fetched with associated key sKey; otherwise return false with an error description.  <a href="group___qx_cache.html#gaf48befbb27f140da88cb3c3ffe2f4660"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Provide basic thread-safe cache feature to backup and restore any kind of objects (for example, object fetched from database) </p>
</div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceqx.html">qx</a>      </li>
      <li class="navelem"><a class="el" href="namespaceqx_1_1cache.html">cache</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Sun Dec 11 2016 13:41:17 for QxOrm by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
